<?php if (!defined('SHUIPF_VERSION')) exit(); ?>
<Admintemplate file="Common/Head"/>
<body class="J_scroll_fixed">
<script type="text/javascript">
    $(document).ready(function()
    {

        //全选
        $('#chkAll').click(function()
        {
            $("#form1 :checkbox[disabled=false]").attr('checked',$("#chk").attr('checked'));
            setbg();
        });

    });
    //设置label背景
    function setbg()
    {
        $(":checkbox").parent("label").css("color","#666666");
        $(":checkbox[checked]").parent("label").css("color","#009900");
        $(":radio").parent("label").css("color","#666666");
        $(":radio[checked]").parent("label").css("color","#009900");
    }
</script>
<div class="wrap J_check_wrap">
    <Admintemplate file="Common/Nav"/>
    <link href="/statics/job/js/js/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/statics/job/js/js/jquery.js"></script>
    <script type="text/javascript" src="/statics/job/js/js/jquery.QSdialog.js"></script>
    <script type="text/javascript" src="/statics/job/js/js/jquery.vtip-min.js"></script>
    <script type="text/javascript" src="/statics/job/js/js/jquery.grid.rowSizing.pack.js"></script>
    <script type="text/javascript" src="/statics/job/js/js/jquery.validate.min.js"></script>
    <!--<script type="text/javascript" src="/statics/job/js/js/common.js"></script>-->
    <div class="toptip">
        <h2>提示：</h2>
        <p>
            系统默认分类不能删除！<br />
            删除分类组将同时删除此组下的所有分类。
        </p>
    </div>
    <form id="form1" name="form1" method="post" action="?act=del_group">

        <table width="100%" border="0" cellpadding="0" cellspacing="0" id="list" class="link_lan"  >
            <tr>
                <td height="26" class="admin_list_tit admin_list_first" >
                    <label id="chkAll"><input type="checkbox" name=" " title="全选/反选" id="chk"/>分类组名称</label></td>
                <td  class="admin_list_tit">调用名</td>
                <td   align="center"  class="admin_list_tit">类型</td>
                <td width="20%"   class="admin_list_tit">操作</td>
            </tr>
            <foreach name='group' item='li'>
            <tr>
                <td   class="admin_list admin_list_first" >
                    <input type="checkbox" name="alias[]" value="{$li.g_alias}"  <if condition="$li[g_sys eq 1]">disabled="disabled"</if>  />
                    <a href="?act=show_category&alias={$li.g_alias}">{$li.g_name}</a>
                </td>
                <td  class="admin_list">
                    {$li.g_alias}

                </td>
                <td align="center"  class="admin_list">
                    <if condition="$li[g_sys] eq 1">
                        系统分类
                        <else/>
                        自定义分类组
                    </if>

                </td>
                <td class="admin_list">
                    <a href="{:U('admin/categroy/show_category')}&alias={$li.g_alias}">查看</a>&nbsp;&nbsp;
                    <if condition="$li[g_sys] neq 1">
                        <a href="{:U('admin/categroy/add_group')}&alias={$li.g_alias}">修改</a>&nbsp;&nbsp;
                        <a onclick="return confirm('删除后无法恢复，你确定要删除吗？')" href="{:U('admin/categroy/del_group')}&alias={$li.g_alias}">删除</a>
                    </if>

                </td>
            </tr>
            </foreach>
        </table>
        <table width="100%" border="0" cellspacing="10"  class="admin_list_btm">
            <tr>
                <td>
                    <input name="ButADD" type="button" class="admin_submit" id="ButADD" value="添加分类组"  onclick="window.location='{:U(\'admin/categroy/add_group\')}'"/>
                    <input name="ButDel" type="submit" class="admin_submit" id="ButDel"  value="删除所选" onclick="return confirm('删除分类组同时也会删除此分类组下个分类，你确定要删除吗？')"/>
                </td>
                <td width="305" align="right">

                </td>
            </tr>
        </table>
    </form>
</div>
<script src="{$config_siteurl}statics/js/common.js?v"></script>
</body>
</html>